package com.qf.springMybatisRandomUser.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author 刘欣
 * @createTime 2023/1/2 20:14
 * @description
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class User {
    private Integer id;
    private String name;
    private String password;
    private String sex;
    private Date birthday;
    private Date registTime;
    private String author;
    private Integer status;
    private Integer account;

    @Override
    public String toString() {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        return this.getName() + "," + this.getPassword() + "," + this.getSex() + "," +
                sdf.format(this.getBirthday()) + "," + sdf.format(this.getRegistTime()) + "," + this.getAuthor() + "," + this.getStatus() + "," + this.getAccount();
    }
}
